public class RoleTest {
    public static void main(String[] args) {
        Role mq = new Role("剑圣",100,'男');
        Role gq = new Role("盖伦", 100, '女');
        mq.show();
        gq.show();
        while (true) {
            mq.attack(gq);
            //判断玩家2是否死亡
            if (gq.getHp() == 0) {
                System.out.println(gq.getName() + "被" + mq.getName() + "击败");
                break;
            }
            gq.attack(mq);
            //判断玩家1是否寄
            if(mq.getHp() == 0){
                System.out.println(mq.getName() + "被" + gq.getName() + "击败");
                break;
            }

        }
    }
}
